package com.wtwd.device.model;

import com.wtwd.device.constant.SeparatorConstant;

import java.io.Serializable;

public class SetAlarm implements Serializable {

    private static final long serialVersionUID = 1778478446L;

    /**
     * 时间 时间格式 HH:mm 例：09:30
     */
    private String time;

    /**
     * 周期 周一至周六用1-6表示，周日用0表示, 如1+2+3+4表示周一至周四
     */
    private String cycle;

    /**
     * 闹钟类型0:普通闹钟，1:测量体温闹钟2:关机 闹钟3:开机闹钟。
     */
    private Integer type;

    /**
     * 生效标志：0代表不生效，1代表生效
     */
    private Integer flag;


    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }


    public String getCycle() {
        return cycle;
    }

    public void setCycle(String cycle) {
        this.cycle = cycle;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public String serialization(){
        return String.valueOf(this.type)+ SeparatorConstant.CMD_BODY_SEGMENTATION.concat(this.time).concat(SeparatorConstant.EXCLAMATION_MARK)+this.cycle+SeparatorConstant.EXCLAMATION_MARK+this.flag;
    }


    @Override
    public String toString() {
        return "SetAlarm{" +
                "time='" + time + '\'' +
                ", cycle='" + cycle + '\'' +
                ", type=" + type +
                ", flag=" + flag +
                '}';
    }
}
